// vue-router
import { createRouter, createWebHistory } from "vue-router";

// pages
import RecordPage from "../pages/RecordPage.vue";
import ThirdPartyPage from "../pages/ThirdPartyPage.vue";
import ReportPage from "../pages/ReportPage.vue";
import SettingPage from "../pages/SettingPage.vue";

// Setting子页面
import PlatformSetting from "../pages/Settings/PlatformSetting.vue";

const routerHistory = createWebHistory()

const routes = [{
    path: '/',
    component: RecordPage
}, {
    path: '/report',
    component: ReportPage
}, {
    path: '/thirdparty',
    component: ThirdPartyPage
}, {
    path: '/settings',
    component: SettingPage,
    children: [
        {
            path: "platforms",
            component: PlatformSetting
        }   
    ]
}]

const router = createRouter({
    routes: routes,
    history: routerHistory
})

export default router